package com.csproj.dispatch.service.dto;


import com.fasterxml.jackson.databind.annotation.JsonSerialize;

import java.io.Serializable;
import java.time.ZonedDateTime;
import java.util.Objects;

/**
 * A DTO for the DispatchRoute entity.
 */
@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL)
public class DispatchRouteDTO implements Serializable {

    private String id;

    private String routeCode;

    private String launchsiteId;

    private String launchstorageId;

    private String destinationstorageId;

    private String routedetail;

    private Boolean deletedFlag;

    private String deleterUserId;

    private ZonedDateTime deletionTime;

    private ZonedDateTime lastModificationTime;

    private String lastModifierUserId;

    private ZonedDateTime creationTime;

    private String creatorUserId;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getRouteCode() {
        return routeCode;
    }

    public void setRouteCode(String routeCode) {
        this.routeCode = routeCode;
    }

    public String getLaunchsiteId() {
        return launchsiteId;
    }

    public void setLaunchsiteId(String launchsiteId) {
        this.launchsiteId = launchsiteId;
    }

    public String getLaunchstorageId() {
        return launchstorageId;
    }

    public void setLaunchstorageId(String launchstorageId) {
        this.launchstorageId = launchstorageId;
    }

    public String getDestinationstorageId() {
        return destinationstorageId;
    }

    public void setDestinationstorageId(String destinationstorageId) {
        this.destinationstorageId = destinationstorageId;
    }

    public String getRoutedetail() {
        return routedetail;
    }

    public void setRoutedetail(String routedetail) {
        this.routedetail = routedetail;
    }

    public Boolean isDeletedFlag() {
        return deletedFlag;
    }

    public void setDeletedFlag(Boolean deletedFlag) {
        this.deletedFlag = deletedFlag;
    }

    public String getDeleterUserId() {
        return deleterUserId;
    }

    public void setDeleterUserId(String deleterUserId) {
        this.deleterUserId = deleterUserId;
    }

    public ZonedDateTime getDeletionTime() {
        return deletionTime;
    }

    public void setDeletionTime(ZonedDateTime deletionTime) {
        this.deletionTime = deletionTime;
    }

    public ZonedDateTime getLastModificationTime() {
        return lastModificationTime;
    }

    public void setLastModificationTime(ZonedDateTime lastModificationTime) {
        this.lastModificationTime = lastModificationTime;
    }

    public String getLastModifierUserId() {
        return lastModifierUserId;
    }

    public void setLastModifierUserId(String lastModifierUserId) {
        this.lastModifierUserId = lastModifierUserId;
    }

    public ZonedDateTime getCreationTime() {
        return creationTime;
    }

    public void setCreationTime(ZonedDateTime creationTime) {
        this.creationTime = creationTime;
    }

    public String getCreatorUserId() {
        return creatorUserId;
    }

    public void setCreatorUserId(String creatorUserId) {
        this.creatorUserId = creatorUserId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }

        DispatchRouteDTO dispatchRouteDTO = (DispatchRouteDTO) o;
        if(dispatchRouteDTO.getId() == null || getId() == null) {
            return false;
        }
        return Objects.equals(getId(), dispatchRouteDTO.getId());
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(getId());
    }

    @Override
    public String toString() {
        return "DispatchRouteDTO{" +
            "id=" + getId() +
            ", routeCode='" + getRouteCode() + "'" +
            ", launchsiteId='" + getLaunchsiteId() + "'" +
            ", launchstorageId='" + getLaunchstorageId() + "'" +
            ", destinationstorageId='" + getDestinationstorageId() + "'" +
            ", routedetail='" + getRoutedetail() + "'" +
            ", deletedFlag='" + isDeletedFlag() + "'" +
            ", deleterUserId='" + getDeleterUserId() + "'" +
            ", deletionTime='" + getDeletionTime() + "'" +
            ", lastModificationTime='" + getLastModificationTime() + "'" +
            ", lastModifierUserId='" + getLastModifierUserId() + "'" +
            ", creationTime='" + getCreationTime() + "'" +
            ", creatorUserId='" + getCreatorUserId() + "'" +
            "}";
    }
}
